# -*- coding: utf-8 -*-

import os
import sys
import datetime


# 源码查找路径
PKG_NAME = 'DramKit'
src_dir = '../../../../%s'%PKG_NAME
sys.path.insert(0, os.path.abspath(src_dir))


# 项目信息
project = 'DramKit'
copyright = '2020-{}, YueYong Hu'.format(datetime.datetime.now().year)
author = 'glhyy'


# 版本信息
pkg_info = {}
fpath= os.path.join(src_dir, PKG_NAME.lower(), '_pkg_info.py')
with open(fpath, 'r') as f:
    exec(''.join(f.readlines()))
release = pkg_info['__version__']

# logo
# html_logo = os.path.abspath('./logo/DramKitLogo.jpg')

# sphinx扩展包及设置
extensions = [
    'sphinx.ext.autodoc',
    'sphinx.ext.napoleon',
    'sphinx.ext.doctest',
    'sphinx.ext.intersphinx',
    'sphinx.ext.todo',
    'sphinx.ext.coverage',
    'sphinx.ext.mathjax',
    # 'recommonmark',
    # 'numpydoc',
    # 'sphinx_markdown_tables',
    # 'sphinx.ext.autosummary',
 	# 'sphinx.ext.imgmath'
]

# autodoc_default_flags = ['members',
#                          'inherited-members',
#                          'show-inheritance']
# autodoc_default_options = {
#     'members': True,
#     'inherited-members': True,
#     'show-inheritance': True,
# }

# # Napoleon settings
# napoleon_google_docstring = True
# napoleon_numpy_docstring = True
napoleon_include_init_with_doc = True
# napoleon_include_private_with_doc = False
# napoleon_include_special_with_doc = False
# napoleon_use_admonition_for_examples = False
# napoleon_use_admonition_for_notes = False
# napoleon_use_admonition_for_references = False
# napoleon_use_ivar = False
# napoleon_use_param = True
# napoleon_use_rtype = True
# napoleon_preprocess_types = False
# napoleon_type_aliases = None
# napoleon_attr_annotations = True

todo_include_todos = True

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = 'en'

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = []


# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages.  See the documentation for
# a list of builtin themes.
#
# html_theme = 'alabaster'
html_theme = 'sphinx_rtd_theme' # 主题设置

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
